<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<title>用户列表-权限管理-{$site.BACK_NAME}</title>
<include file="Public:jscss"/>
</head>
<body>
<div class="wrap">
 <include file="Public:head"/>
 <div class="mainBody">
  <include file="Public:left"/>
  <div id="Right">
   <div class="Item hr">
    <div class="current">管理员列表</div>
   </div>
   <form action="" method="post" id="quickForm">
    <b>快速搜索：</b>&nbsp;
    <input placeholder="请输入账号" id="quickEmail" class="input" type="text" name="kwd" value="{$kwd}"/> &nbsp;
	<input type="submit" class="btn quickSubmit" value='搜索'/>
   </form>
   <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab">
    <thead>
     <tr>
      <td>AID</td>
	  <td>姓名</td>
      <td>账号</td>
	  <td>角色</td>
	  <td>直接上属</td>
      <td>状态</td>
      <td>备注</td>
      <td>联系方式</td>
	  <td>头衔</td>
	  <td>总积分</td>
	  <td>可用积分</td>
      <td width="150">操作</td>
     </tr>
    </thead>
    <volist name="list" id="vo">
    <tr align="center" aid="{$vo.user_id}">
     <td>{$vo.user_id}</td>
	 <td align="left">{$vo.realname}</td>
     <td align="left">{$vo.email}</td>
	 <td align="left">{$vo.role}</td>
	 <td align="left">
	  <empty name="vo.boss">
	  <font style="color:red;">未指定</font>
	  <else/>
	  {$vo.boss}
	  </empty>
	 </td>
     <td>
	  <eq name="vo.status" value="1">
	  <font style="color:green;">启用</font>
	  <else/>
	  <font style="color:red;">禁用</font>
	  </eq>
	 </td>
     <td align="left">{$vo.remark}</td>
     <td>{$vo.phone}</td>
	 <td><php>$tt = lv_score($vo['total_score']);</php>{$tt['title']}</td>
	 <td align="left"> {$vo.total_score}</td>
	 <td align="left"> {$vo.score}</td>
     <td>
      <if condition="$vo['email'] eq C('RBAC_SUPER_ADMIN')">
       --
      <else/>
       [ <a href="{:U('User/edt', array('aid'=>$vo['user_id']))}">编辑</a> ]
	   [ <a href="{:U('User/score', array('uid'=>$vo['user_id']))}">积分</a> ]
       [ <a data-id="{$vo.user_id}" href="javascript:void(0)" name="{$vo.email}" class="cfz_del">删除 </a> ]
      </if>
	 </td>
    </tr>
    </volist>
   </table>
   <div class="viciao">{$page}</div>
  </div>
 </div>
</div>
<div class="clear"></div>
<include file="Public:foot"/>
<script type="text/javascript">
$(function(){
	$(".cfz_del").click(function(){
		var dellink = "{:U('User/del')}";
		var deldata = { aid: $(this).data("id")};
		$.jBox.confirm(
			'您真的打算删除【<b>'+$(this).attr("name")+'</b>】吗?',
			"温馨提示",
			function(v, h, f) {
				if (v == true) {
					commonAjaxGet(dellink, deldata);
				}
			}, 
			{buttons: {'是': true, '否': false}}
		);
		return false;
	});
});
</script>
</body>
</html>